import {
  addcompany,
  batch_change_account,
  addcompanys,
  addother_business,
  renewalorder,
  renewalsubmit,
  renewalsubmits,
  renewalretry,
  renewalcancel,
  addpaymentorder,
  editcompany,
  addactivity,
  editactivity,
  dispatchrefuse,
  renewalrefuse,
  accountrefuse,
  cashierrefuse,
  accountrefuses,
  dispatchretry,
  accountretry,
  cashierretry,
  accountretrys,
  deletepaymentorder,
  dispatchsubmit,
  accountcache,
  accountsubmit,
  cashiersubmit,
  accountsubmits,
  paymentordercash,
  payment_take,
  editpayment_take,
  deletepayment_take,
  base_salary,
  editbase_salary,
  deletebase_salary,
  open_account,
  editopen_account,
  deleteopen_account,
  account_tax,
  editaccount_tax,
  deleteaccount_tax,
  claim,
  revert_claim,
  remark_company,
  directory,
  editdirectory,
  deletedirectory,
  peer,
  editpeer,
  deletepeer,
  other_business_take,
  editother_business_take,
  receiver_submit,
  coordination_submit,
  auxiliary_coordination_submit,
  set_register,
  addinvoice,
  editinvoice,
  addrescind,
  editrescind,
  submit_to_account,
  addinput_tax,
  editinput_tax,
} from '@/services/business';

const UserModel = {
  namespace: 'business',
  state: {
    currentUser: {},
  },
  effects: {
    *addinvoice({ payload }, { call, put }) {
      const response = yield call(addinvoice, payload);
      return response;
    },
    *editinvoice({ payload }, { call, put }) {
      const response = yield call(editinvoice, payload);
      return response;
    },
    *submit_to_account({ payload }, { call, put }) {
      const response = yield call(submit_to_account, payload);
      return response;
    },
    *addrescind({ payload }, { call, put }) {
      const response = yield call(addrescind, payload);
      return response;
    },
    *editrescind({ payload }, { call, put }) {
      const response = yield call(editrescind, payload);
      return response;
    },
    *addinput_tax({ payload }, { call, put }) {
      const response = yield call(addinput_tax, payload);
      return response;
    },
    *editinput_tax({ payload }, { call, put }) {
      const response = yield call(editinput_tax, payload);
      return response;
    },
    *addcompany({ payload }, { call, put }) {
      const response = yield call(addcompany, payload);
      return response;
    }, 
    *batch_change_account({ payload }, { call, put }) {
      const response = yield call(batch_change_account, payload);
      return response;
    },
    *addcompanys({ payload }, { call, put }) {
      const response = yield call(addcompanys, payload);
      return response;
    },
    *addother_business({ payload }, { call, put }) {
      const response = yield call(addother_business, payload);
      return response;
    },
    *renewalorder({ payload }, { call, put }) {
      const response = yield call(renewalorder, payload);
      return response;
    },
    *renewalsubmit({ payload }, { call, put }) {
      const response = yield call(renewalsubmit, payload);
      return response;
    },
    *renewalsubmits({ payload }, { call, put }) {
      const response = yield call(renewalsubmits, payload);
      return response;
    },
    *renewalretry({ payload }, { call, put }) {
      const response = yield call(renewalretry, payload);
      return response;
    },
    *renewalcancel({ payload }, { call, put }) {
      const response = yield call(renewalcancel, payload);
      return response;
    },
    *deletepaymentorder({ payload }, { call, put }) {
      const response = yield call(deletepaymentorder, payload);
      return response;
    },
    *addpaymentorder({ payload }, { call, put }) {
      const response = yield call(addpaymentorder, payload);
      return response;
    },
    *editcompany({ payload }, { call, put }) {
      const response = yield call(editcompany, payload);
      return response;
    },
    *addactivity({ payload }, { call, put }) {
      const response = yield call(addactivity, payload);
      return response;
    },
    *editactivity({ payload }, { call, put }) {
      const response = yield call(editactivity, payload);
      return response;
    },
    *dispatchrefuse({ payload }, { call, put }) {
      const response = yield call(dispatchrefuse, payload);
      return response;
    },
    *renewalrefuse({ payload }, { call, put }) {
      const response = yield call(renewalrefuse, payload);
      return response;
    },
    *accountrefuse({ payload }, { call, put }) {
      const response = yield call(accountrefuse, payload);
      return response;
    },
    *accountrefuses({ payload }, { call, put }) {
      const response = yield call(accountrefuses, payload);
      return response;
    },
    *cashierrefuse({ payload }, { call, put }) {
      const response = yield call(cashierrefuse, payload);
      return response;
    },
    *cashierretry({ payload }, { call, put }) {
      const response = yield call(cashierretry, payload);
      return response;
    },
    *dispatchretry({ payload }, { call, put }) {
      const response = yield call(dispatchretry, payload);
      return response;
    },
    *accountretrys({ payload }, { call, put }) {
      const response = yield call(accountretrys, payload);
      return response;
    },
    *accountretry({ payload }, { call, put }) {
      const response = yield call(accountretry, payload);
      return response;
    },
    *dispatchsubmit({ payload }, { call, put }) {
      const response = yield call(dispatchsubmit, payload);
      return response;
    },
    *accountcache({ payload }, { call, put }) {
      const response = yield call(accountcache, payload);
      return response;
    },
    *accountsubmit({ payload }, { call, put }) {
      const response = yield call(accountsubmit, payload);
      return response;
    },
    *accountsubmits({ payload }, { call, put }) {
      const response = yield call(accountsubmits, payload);
      return response;
    },
    *cashiersubmit({ payload }, { call, put }) {
      const response = yield call(cashiersubmit, payload);
      return response;
    },
    *paymentordercash({ payload }, { call, put }) {
      const response = yield call(paymentordercash, payload);
      return response;
    },
    *payment_take({ payload }, { call, put }) {
      const response = yield call(payment_take, payload);
      return response;
    },
    *editpayment_take({ payload }, { call, put }) {
      const response = yield call(editpayment_take, payload);
      return response;
    },
    *deletepayment_take({ payload }, { call, put }) {
      const response = yield call(deletepayment_take, payload);
      return response;
    },
    *base_salary({ payload }, { call, put }) {
      const response = yield call(base_salary, payload);
      return response;
    },
    *editbase_salary({ payload }, { call, put }) {
      const response = yield call(editbase_salary, payload);
      return response;
    },
    *deletebase_salary({ payload }, { call, put }) {
      const response = yield call(deletebase_salary, payload);
      return response;
    },

    *account_tax({ payload }, { call, put }) {
      const response = yield call(account_tax, payload);
      return response;
    },
    *editaccount_tax({ payload }, { call, put }) {
      const response = yield call(editaccount_tax, payload);
      return response;
    },
    *deleteaccount_tax({ payload }, { call, put }) {
      const response = yield call(deleteaccount_tax, payload);
      return response;
    },
    *claim({ payload }, { call, put }) {
      const response = yield call(claim, payload);
      return response;
    },
    *revert_claim({ payload }, { call, put }) {
      const response = yield call(revert_claim, payload);
      return response;
    },
    *remark_company({ payload }, { call, put }) {
      const response = yield call(remark_company, payload);
      return response;
    },
    *directory({ payload }, { call, put }) {
      const response = yield call(directory, payload);
      return response;
    },
    *editdirectory({ payload }, { call, put }) {
      const response = yield call(editdirectory, payload);
      return response;
    },
    *deletedirectory({ payload }, { call, put }) {
      const response = yield call(deletedirectory, payload);
      return response;
    },
    *peer({ payload }, { call, put }) {
      const response = yield call(peer, payload);
      return response;
    },
    *editpeer({ payload }, { call, put }) {
      const response = yield call(editpeer, payload);
      return response;
    },
    *deletepeer({ payload }, { call, put }) {
      const response = yield call(deletepeer, payload);
      return response;
    },

    *open_account({ payload }, { call, put }) {
      const response = yield call(open_account, payload);
      return response;
    },
    *editopen_account({ payload }, { call, put }) {
      const response = yield call(editopen_account, payload);
      return response;
    },
    *deleteopen_account({ payload }, { call, put }) {
      const response = yield call(deleteopen_account, payload);
      return response;
    },
    *other_business_take({ payload }, { call, put }) {
      const response = yield call(other_business_take, payload);
      return response;
    },
    *editother_business_take({ payload }, { call, put }) {
      const response = yield call(editother_business_take, payload);
      return response;
    },
    *receiver_submit({ payload }, { call, put }) {
      const response = yield call(receiver_submit, payload);
      return response;
    },
    *coordination_submit({ payload }, { call, put }) {
      const response = yield call(coordination_submit, payload);
      return response;
    },
    *auxiliary_coordination_submit({ payload }, { call, put }) {
      const response = yield call(auxiliary_coordination_submit, payload);
      return response;
    },
    *set_register({ payload }, { call, put }) {
      const response = yield call(set_register, payload);
      return response;
    },
  },
  reducers: {
    saveCurrentUser(state, action) {
      return { ...state, ...action.payload };
    },
  },
};
export default UserModel;
